<?php
header ( "Content-type: text/html; charset=utf-8" );
?>
<script type="text/javascript">
function showVisitDetail(vid) {
	JYCsm.openWindow('?c=visit&a=detail&vid='+vid, {id:'visit-detail-dlg', title: '回访详情', width: 500});
}
</script>
<table class="qi_table" border="0" cellpadding="0" cellspacing="1">
	<tr>
		<th>患者姓名</th>
		<th>回访对象</th>
		<th>联系电话</th>
		<th>业务系统</th>
		<th>回访方式</th>
		<th>回访人</th>
		<th>回访时间</th>
		<th>回访状态</th>
		<th>回访结果</th>
		<th>操作</th>
	</tr>
     <?php 
     if (count($rows) > 0) {
                     foreach ($rows as $row) {?>
                      <tr>
		<td><?php echo $row['PATIENT_NAME']?></td>
		<td><?php echo $row['TARGET_USER']?></td>
		<td><?php echo $row['VISIT_PHONE']?></td>
		<td><?php echo ATools::getConfig('app.visitSystem.'.$row['SYS_ID'])?></td>
		<td><?php echo ATools::getConfig('app.visitType.'.$row['VISIT_TYPE'])?></td>
		<td><?php echo ATools::retUserTrueName($row['USER_NAME'])?></td>
		<td><?php echo $row['VISIT_TIME']?></td>
		<td><?php echo ATools::getVisitStatus($row['VISIT_STATE'])?></td>
		<td><?php echo ATools::getConfig('app.visitResult.'.$row['VISIT_RESULT'])?></td>
		<td><a href="javascript:showVisitDetail('<?php echo $row['V_ID']?>');">详情</a></td>
	</tr>
                      <?php }?>
    <tr>
		<td colspan="10"><div class="pager-his"><?php echo $pager;?></div><div class="clear"></div></td>
	</tr>
    <?php } else {?>
                      <tr height="40"><td style="text-align:center;color:green;" colspan='10'>该用户暂时还没有回访信息</td></tr>
                      <?php }?>
</table>